-
Notifications
You must be signed in to change notification settings - Fork 174
HW done #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
HW done #102
Conversation
antonkazakov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Привет. Оставил пару комментариев
|
|
||
| @Inject | ||
| lateinit var vmFactory: ViewModelFactory | ||
| private val viewModel: ViewModelReceiver by lazy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не думаю что в lazy тем более потокобезопасном есть смысл
|
|
||
| fun inject(fragment: FragmentReceiver) | ||
|
|
||
| @Component.Factory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А есть ли тут смысл в фабрике? не кажется когда у тебя параметров не добавляется билдер удобнее, ничего писать не нужно
| } | ||
|
|
||
| companion object { | ||
| private var fragmentReceiverComponent: FragmentReceiverComponent? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Понадобиться где то его инстанс?
| import javax.inject.Qualifier | ||
|
|
||
| @Qualifier | ||
| @Retention(AnnotationRetention.BINARY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно убрать
|
|
||
| class ViewModelReceiver( | ||
| class ViewModelReceiver @Inject constructor( | ||
| private val observer: Channel<LocalEvent>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не очень правильно что ты можешь в приемники эмитить события в Channel, сделай здесь ReceiveChannel, а в другой ВМ SendChannel
No description provided.